package com.wyp.design.pattern.behavior.templatemethod;

/**
 * @author: Oliver
 * @time: 2020/5/23/20:02
 */
public class FECourse extends ACourse {
    /**
     * 开放一个参数，进行前端课程为某一个分类时，可以传递参数，进行写手记
     */
    private boolean needWriteArticle;

    public FECourse(boolean needWriteArticle) {
        this.needWriteArticle = needWriteArticle;
    }

    @Override
    void packageCourse() {
        System.out.println("提供课程的前端代码");
        System.out.println("提供课程的图片等多媒体素材");
    }

    @Override
    protected boolean needWriteArticle() {
        return this.needWriteArticle;
    }
}
